package pattern.structrual.decorator.v2;

/**
 * @Author Gavin
 * @date 2020.07.16 15:26
 */
public class EggDecorator extends AbstractDescorator {
    public EggDecorator(ABattercake aBattercake) {
        super(aBattercake);
    }

    @Override
    void doSomething() {
        System.out.println("额外做一些事情");
    }

    @Override
    protected String desc() {
        return super.desc() + "加1个鸡蛋";
    }

    @Override
    protected String cost() {
        return super.cost() + "加1元";
    }
}
